Optimal. Leaf size=33 \[ -\frac {a x}{c}+\frac {2 a \cos (e+f x)}{f (c-c \sin (e+f x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 33, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {2814, 2727}
\begin {gather*} \frac {2 a \cos (e+f x)}{f (c-c \sin (e+f x))}-\frac {a x}{c} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2727
Rule 2814
Rubi steps
\begin {align*} \int \frac {a+a \sin (e+f x)}{c-c \sin (e+f x)} \, dx &=-\frac {a x}{c}+(2 a) \int \frac {1}{c-c \sin (e+f x)} \, dx\\ &=-\frac {a x}{c}+\frac {2 a \cos (e+f x)}{f (c-c \sin (e+f x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(83\) vs. \(2(33)=66\).
time = 0.13, size = 83, normalized size = 2.52 \begin {gather*} \frac {a \left (-f x \cos \left (\frac {f x}{2}\right )+4 \sin \left (\frac {f x}{2}\right )+f x \sin \left (e+\frac {f x}{2}\right )\right )}{c f \left (\cos \left (\frac {e}{2}\right )-\sin \left (\frac {e}{2}\right )\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.24, size = 38, normalized size = 1.15
method | result | size |
risch | \(-\frac {a x}{c}+\frac {4 a}{f c \left ({\mathrm e}^{i \left (f x +e \right )}-i\right )}\) | \(32\) |
derivativedivides | \(\frac {2 a \left (-\frac {2}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1}-\arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )\right )}{f c}\) | \(38\) |
default | \(\frac {2 a \left (-\frac {2}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1}-\arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )\right )}{f c}\) | \(38\) |
norman | \(\frac {\frac {a x}{c}+\frac {a x \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{c}-\frac {4 a}{c f}-\frac {a x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{c}-\frac {a x \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{c}-\frac {4 a \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{c f}}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right ) \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}\) | \(117\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 88 vs.
\(2 (36) = 72\).
time = 0.49, size = 88, normalized size = 2.67 \begin {gather*} -\frac {2 \, {\left (a {\left (\frac {\arctan \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{c} - \frac {1}{c - \frac {c \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}\right )} - \frac {a}{c - \frac {c \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}\right )}}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.33, size = 70, normalized size = 2.12 \begin {gather*} -\frac {a f x + {\left (a f x - 2 \, a\right )} \cos \left (f x + e\right ) - {\left (a f x + 2 \, a\right )} \sin \left (f x + e\right ) - 2 \, a}{c f \cos \left (f x + e\right ) - c f \sin \left (f x + e\right ) + c f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 88 vs.
\(2 (26) = 52\).
time = 0.66, size = 88, normalized size = 2.67 \begin {gather*} \begin {cases} - \frac {a f x \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )}}{c f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} - c f} + \frac {a f x}{c f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} - c f} - \frac {4 a}{c f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} - c f} & \text {for}\: f \neq 0 \\\frac {x \left (a \sin {\left (e \right )} + a\right )}{- c \sin {\left (e \right )} + c} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.42, size = 37, normalized size = 1.12 \begin {gather*} -\frac {\frac {{\left (f x + e\right )} a}{c} + \frac {4 \, a}{c {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}}}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 6.81, size = 46, normalized size = 1.39 \begin {gather*} -\frac {a\,x}{c}-\frac {a\,\left (e+f\,x\right )-a\,\left (e+f\,x-4\right )}{c\,f\,\left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )-1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________